/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package hu.rsc.feeds.client.service;

import hu.rsc.feeds.client.data.Category;
import hu.rsc.feeds.client.data.ColumnFilterList;
import hu.rsc.feeds.client.data.Entry;
import hu.rsc.feeds.client.data.Feed;
import hu.rsc.feeds.client.data.GeneratedEntry;
import hu.rsc.feeds.client.data.GeneratedFeed;
import hu.rsc.feeds.client.data.InitData;
import hu.rsc.feeds.client.data.ServerMessage;
import hu.rsc.feeds.client.data.SystemFeed;
import hu.rsc.feeds.client.data.UserCategory;
import hu.rsc.feeds.client.data.UserFeed;
import hu.rsc.feeds.client.data.UserInfo;

import java.util.List;

import com.google.gwt.gen2.table.client.TableModelHelper.Request;
import com.google.gwt.gen2.table.client.TableModelHelper.Response;
import com.google.gwt.user.client.rpc.AsyncCallback;

/**
 * 
 * @author arbuckle
 */
public interface RssReaderServiceAsync {
    public void autenticate(String userName, String password, AsyncCallback<InitData> callback);

    public void autenticateDemo(String language, AsyncCallback<InitData> callback);

    public void doInit(AsyncCallback<InitData> callback);

    public void getCategories(AsyncCallback<List<Category>> callback);

    public void getEntries(String key, AsyncCallback callback);

    public void getFeeds(AsyncCallback<List<Feed>> callback);

    public void getUserFeeds(AsyncCallback<List<UserFeed>> callback);

    public void isLoggined(AsyncCallback<Boolean> callback);

    public void logout(AsyncCallback<InitData> callback);

    public void offer(String name, String url, Long category, String language, String description, AsyncCallback<Feed> callback);

    public void register(UserInfo userInfo, AsyncCallback<InitData> callback);

    public void saveUserFeeds(List<UserFeed> l, AsyncCallback<String> callback);

    void deleteGeneratedEntry(Long id, AsyncCallback<String> callback);

    void deleteGeneratedFeed(Long id, AsyncCallback<String> callback);

    void deleteGeneratedSystemFeed(Long id, AsyncCallback<String> callback);

    void deleteUserFeed(UserFeed userFeed, AsyncCallback<Void> callback);

    void getBlobStoreUploadUrl(AsyncCallback<String> callback);

    void getFeeds(Request request, AsyncCallback<Response<Feed>> callback);

    void getFeedsCount(ColumnFilterList filters, AsyncCallback<Integer> callback);

    void getGeneratedEntries(Request request, ColumnFilterList filters, Long generatedFeed, AsyncCallback<Response<GeneratedEntry>> callback);

    void getGeneratedEntriesCount(ColumnFilterList filters, Long generatedFeed, AsyncCallback<Integer> callback);

    void getGeneratedFeeds(Request request, AsyncCallback<Response<GeneratedFeed>> callback);

    void getGeneratedFeedsCount(ColumnFilterList filters, AsyncCallback<Integer> callback);

    void getSystemFeeds(Request request, AsyncCallback<Response<SystemFeed>> callback);

    void getSystemFeedsCount(ColumnFilterList filters, AsyncCallback<Integer> callback);

    void newCategory(Category category, AsyncCallback<Category> callback);

    void newUserCategory(UserCategory usercategory, AsyncCallback<UserCategory> callback);

    void saveFeed(Feed feed, AsyncCallback<Feed> callback);

    void saveGeneratedEntry(GeneratedEntry entry, AsyncCallback<GeneratedEntry> callback);

    void saveGeneratedFeed(GeneratedFeed feed, AsyncCallback<GeneratedFeed> callback);

    void saveSystemFeed(SystemFeed feed, AsyncCallback<ServerMessage<SystemFeed>> callback);

    void sendPost(Entry entry, List<String> recipients, AsyncCallback<Void> callback);

}
